<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>基于 useragent.js 获取 User-Agent 相关信息</title>
	</head>

	<body>
		<!-- IE8及以下需导入该js -->
		<script src="object.keys.js" type="text/javascript" charset="utf-8"></script>
		<script src="useragent.js" type="text/javascript" charset="utf-8"></script>

		<script type="text/javascript">
			var userAgent = USERAGENT.analyze(navigator.userAgent);
			console.log("user-agent: " + userAgent.ua);
			console.log("browser: " + userAgent.browser.full + " (" + userAgent.browser.name + " - v" + userAgent.browser
				.version + " )");
			console.log("os: " + userAgent.os.full + " (" + userAgent.os.name + " - v" + userAgent.os.version + " )");
			console.log("device: " + userAgent.device.full);
		</script>
	</body>
</html>
